<!DOCTYPE html>
<html>
    <?php
    $title = $ProductOne['p_name'];
    $keywords = $ProductOne['p_kwd'];
    $description = $ProductOne['p_des'];
    ?>
    <head>
        <!-- start details -->
        <script src="<?php echo $helper->to('js/jquery.min.js', false) ?>"></script>
        <link rel="stylesheet" type="text/css" href="<?php echo $helper->to('css/productviewgallery.css', false) ?>" media="all" />
        <script type="text/javascript" src="<?php echo $helper->to('js/cloud-zoom.1.0.3.min.js', false) ?>"></script>
        <script type="text/javascript" src="<?php echo $helper->to('js/jquery.fancybox.pack.js', false) ?>"></script>
        <script type="text/javascript" src="<?php echo $helper->to('js/productviewgallery.js', false) ?>"></script>
        <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-58c4eabb859efec7"></script>
        <?php require('tpl/header.php') ?>
    </head>
    <body>
        <?php require('tpl/nav.php') ?>
        <?php require('tpl/title.php') ?>

        <?php
        $gallery = '';
        foreach ($productImg as $key => $v) {
            $galleryA[] = '"item_' . $key . '":{"orig":"' . $helper->to($v)
                    . '","main":"' . $helper->to($v)
                    . '","thumb":"' . $helper->to($v) . '","label":""}';

            $gallery = implode(',', $galleryA);
        }
        $main = '"orig":"' . $helper->to($p_img)
                . '","main":"' . $helper->to($p_img)
                . '","thumb":"' . $helper->to($p_img) . '","label":""'
        ?>
        <!-- start main -->
        <div class="main_bg">
            <div class="wrap">
                <div class="main">
                    <!-- start content -->
                    <div class="single">
                        <!-- start span1_of_1 -->
                        <div class="left_content">
                            <div class="span1_of_1">
                                <!-- start product_slider -->
                                <div class="product-view">
                                    <div class="product-essential">
                                        <div class="product-img-box">
                                            <div class="more-views">
                                                <div class="more-views-container">
                                                    <ul>
                                                        <?php echo $images ?>
                                                    </ul>
                                                </div>
                                            </div>
                                            <div class="product-image"> 
                                                <a class="cs-fancybox-thumbs cloud-zoom" rel="adjustX:30,adjustY:0,position:'right',tint:'#202020',tintOpacity:0.5,smoothMove:2,showTitle:true,titleOpacity:0.5" data-fancybox-group="thumb" href="<?php echo $helper->to($p_img) ?>">
                                                    <img src="<?php echo $helper->to($p_img) ?>" alt="">
                                                </a>
                                            </div>
                                            <script type="text/javascript">
                                                var prodGallery = jQblvg.parseJSON('{"prod_1":{\n\
                                                                "main":{<?php echo $main ?>},\n\
                                                                "gallery":{<?php echo $gallery ?>},\n\
                                                                "type":"simple", "video":false}}'),
                                                        gallery_elmnt = jQblvg('.product-img-box'),
                                                        galleryObj = new Object(),
                                                        gallery_conf = new Object();
                                                gallery_conf.moreviewitem = '<a class="cs-fancybox-thumbs" data-fancybox-group="thumb"  href=""  title="" alt=""><img src="" src_main="" title="" alt="" /></a>';
                                                gallery_conf.animspeed = 200;
                                                jQblvg(document).ready(function () {
                                                    galleryObj[1] = new prodViewGalleryForm(prodGallery, 'prod_1', gallery_elmnt, gallery_conf, '.product-image', '.more-views', 'http:');
                                                    jQblvg('.product-image .cs-fancybox-thumbs').absoluteClick();
                                                    jQblvg('.cs-fancybox-thumbs').fancybox({prevEffect: 'none',
                                                        nextEffect: 'none',
                                                        closeBtn: true,
                                                        arrows: true,
                                                        nextClick: true,
                                                        helpers: {
                                                            thumbs: {
                                                                position: 'bottom'
                                                            }
                                                        }
                                                    });
                                                    jQblvg('#wrap').css('z-index', '100');
                                                    jQblvg('.more-views-container').elScroll({type: 'vertical', elqty: 4, btn_pos: 'border', scroll_speed: 400});
                                                });
                                                function initGallery(a, b, element) {
                                                    galleryObj[a] = new prodViewGalleryForm(prods, b, gallery_elmnt, gallery_conf, '.product-image', '.more-views', '');
                                                }
                                                ;
                                            </script>
                                        </div>
                                    </div>
                                </div>
                                <!-- end product_slider -->
                            </div>
                            <!-- start span1_of_1 -->
                            <div class="span1_of_1_des">
                                <div class="desc1">
                                    <h3><?php echo $ProductOne['p_name'] ?></h3>
<!--                                    <h5>Rs. 499 <span>599</span>  <a href="#">click for offer</a></h5>-->
                                    <div class="available">
                                <div class="btn_form">
                                            <form>
                                                <input type="submit" value="buy now" title="" />
                                            </form>
                                        </div>
<!--                                        <span><a href="#">login to save in wishlist </a></span>-->
                                        <p><?php echo $ProductOne['p_des'] ?></p>
                                    </div>

                                    <div class="share-desc">
                                        <div class="share">
                                            <h4>Share Product :</h4>
                                            <div class="addthis_inline_share_toolbox share_nav"></div>
                                        </div>
                                        <div class="clear"></div>
                                    </div>
                                </div>
                            </div>
                            <div class="clear"></div>
                            <!-- start left content_bottom -->
                            <?php require('tpl/content.php') ?>
                            <!-- end left content_bottom -->
                        </div>
                        <!-- start left_sidebar -->
                        <?php require('tpl/product_left.php') ?>
                        <div class="clear"></div>
                    </div>	
                    <!-- end content -->
                </div>
            </div>
        </div>

        <!--footer-->
        <?php require('tpl/footer.php') ?>
    </body>
</html>